<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="lib/leaflet/leaflet.css"/>
    <link rel="stylesheet" type="text/css" href="css/map.css"/>
    <script src="lib/leaflet/leaflet.js"></script>
    <script src="lib/plugins/leaflet.ChineseTmsProviders.js"></script>
    <script src="lib/plugins/leaflet-tilelayer-wmts-src.js"></script>
    <title>地图</title>
</head>

<body>
<div id="map"></div>
<script src="js/createMap.js"></script>
<script src="js/common.js"></script>
<script src="js/interface.js"></script>
<script src="lib/plugins/heatMap.js"></script>
<script src="js/draw.js"></script>
<script src="lib/plugins/PruneCluster.js"></script>
<script>
    switchBaseLayer('高德', '道路图');
    var latlngs = [
        [45.51, -122.68],
        [37.77, -122.43],
        [34.04, -118.2]
    ];
    var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);

    // map.fitBounds(polyline.getBounds());
    // polyline.on('click', function (e) {
    //     console.log(e);
    // });
    // var marker=L.marker([50.5, 30.5]);
    // marker.addTo(map);
    console.log(polyline)
</script>

</body>

</html>